<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/28
 * Time: 21:35
 */

namespace app\api\model;


class Category extends BaseModel
{
    protected $hidden = ['delete_time','update_time','topic_img_id'];

    // 一对一
    // 有外键 belongsTo
    public function Image(){
        return $this->belongsTo('Image','topic_img_id','id');
    }
}